package cn.shengchao.examstar.me.infrastructure.dao;

import cn.shengchao.examstar.me.infrastructure.dao.po.TProductCourseUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductCourseUserDao extends BaseMapper<TProductCourseUser> {
    Long selectStudentSum(List<Long> courseIds);

    List<Long> getMyCourseListByProductName(@Param("uid") Long uid, @Param("productName") String productName);

    TProductCourseUser lastPlay(@Param("uid") Long uid, @Param("courseId") String courseId);

    /**
     * 获取指定用户在指定类目下的课程总观看时长（秒）
     * 
     * @param userId 用户ID
     * @param specificationTypeId 类目ID
     * @return 总观看时长（秒）
     */
    Long getTotalWatchLengthBySpecificationType(@Param("userId") Long userId,@Param("specificationTypeId") Long specificationTypeId);
}
